package cn.ilikes.tools.nosql.test.jpa.pojos;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import cn.ilikes.tools.nosql.jpa.annotations.IndexColumn;

@Entity
@Table(name = "pe_employee_member", schema = "ilikes")
public class EmployeeMember {

	@Id
	@IndexColumn(index = IndexColumn.Index.analyzed, name = "id", store = IndexColumn.Store.yes)
	private Integer uuid;

	@Column(name = "member_userid")
	@IndexColumn(index = IndexColumn.Index.not_analyzed, name = "memberUserId", store = IndexColumn.Store.no)
	private String memberUserId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "employee_group_id")
	@IndexColumn(index = IndexColumn.Index.not_analyzed, name = "employeeGroupId", store = IndexColumn.Store.no)
	private EmployeeGroup employeeGroup;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "employeeMember")
	private List<EmployeePePlanStatus> employeePePlanStatus;

	public Integer getUuid() {
		return uuid;
	}

	public void setUuid(Integer uuid) {
		this.uuid = uuid;
	}

	public String getMemberUserId() {
		return memberUserId;
	}

	public void setMemberUserId(String memberUserId) {
		this.memberUserId = memberUserId;
	}

	public EmployeeGroup getEmployeeGroup() {
		return employeeGroup;
	}

	public void setEmployeeGroup(EmployeeGroup employeeGroup) {
		this.employeeGroup = employeeGroup;
	}

	public List<EmployeePePlanStatus> getEmployeePePlanStatus() {
		return employeePePlanStatus;
	}

	public void setEmployeePePlanStatus(List<EmployeePePlanStatus> employeePePlanStatus) {
		this.employeePePlanStatus = employeePePlanStatus;
	}

}